﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace ExamSharedClasses
{
    [Serializable()]
    public class Country 
    {
        public const string TABLENAME = "country";
        public const string COUNTRY_ID = "country_id";
        public const string COUNTRY_NAME = "country_name";
        public const string COUNTRY_TAG = "country_tag";

        public int CountryId { get; set; }
        public string CountryName { get; set; }
        public string CountryTag { get; set; }

        public Country()
        {
            this.CountryId = -1;
            this.CountryName = "";
            this.CountryTag = "";
        }
        public Country(int countryId, string countryName, string countryTag)
        {
            this.CountryId = countryId;
            this.CountryName = countryName;
            this.CountryTag = countryTag;
        }

        public override string ToString() {
            StringBuilder sb = new StringBuilder( "Country: " );
            sb.Append( "ID: " + CountryId.ToString() + ", " );
            if ( CountryName != null )
                sb.Append( "NAME: " + CountryName.ToString() + ", " );
            if ( CountryTag != null )
                sb.Append( "FLAG: " + CountryTag.ToString() + "\n" );
            return sb.ToString();
        }
    }

    
}
